#pragma once
#include "../bean/user.h"
#include <workflow/WFHttpServer.h>
#include <condition_variable>
#include <mutex>
#include <sstream>
#include <iostream>
#include <memory>
#include <workflow/MySQLResult.h>
#include "../config/mysqlconfig.h"

class LoginMysql
{
private:
    std::mutex locker;
    std::condition_variable vb;
    bool isFinished = false;
    bool user_is_in_mysql = false;
    static void mysql_callback(WFMySQLTask *task);

public:
    LoginMysql();
    ~LoginMysql();
    bool userIsInMysql(const std::shared_ptr<User> &);
};